<template>
  <el-drawer
      :title=title
      :visible.sync="dialogVisible"
      :wrapperClosable="false"
  >
    <slot name="content"></slot>
  </el-drawer>
</template>

<script>
  export default {
    name: "BaseDrawer",
    props: {
      title: {
        default: "表单",
        type: String
      },
    },

    data() {
      return {
        dialogVisible: true,
      }
    },
    methods: {

    },

    created() {
      this.$bus.on('confirm-click', () => {
        if (this.dialogVisible) {
          this.dialogVisible = false;
        }
      });
    }

  }
</script>

<style>

</style>